<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Like
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: _composeItems.tpl 2010-09-07 17:53 idris $
 * @author     Idris
 */
?>

<?php if (isset($this->users) && $this->users->getTotalItemCount() > 0): ?>
 <div id="all_list_users" class="list_type">
   <span class="list_header users"><?php echo $this->translate("like_Users"); ?></span>
   <?php $counter = 0; ?>
   <?php foreach ($this->users as $item): ?>
     <div href="<?php echo $item->getHref(); ?>" class="item" id="<?php echo $item->getGuid(); ?>">
       <span class='photo' style='background-image: url()'><?php echo $this->htmlLink($item->getHref(), $this->itemPhoto($item, 'thumb.icon'), array('target' => '_blank')); ?></span>
       <span class="name"><?php echo $this->htmlLink($item->getHref(), $item->getTitle(), array('target' => '_blank')); ?></span>

       <?php if (Engine_Api::_()->like()->isLike($item)): ?>
       <div style="display: none;" class="like_button_container"><a href="javascript:void(0)" class="like_button_link like" id="like_<?php echo $item->getGuid(); ?>"><span class="like_button"><?php echo $this->translate("like_Like"); ?></span></a></div>
       <div class="like_button_container"><a href="javascript:void(0)" class="like_button_link unlike" id="unlike_<?php echo $item->getGuid(); ?>"><span class="unlike_button"><?php echo $this->translate("like_Unlike"); ?></span></a></div>
      <?php else: ?>
       <div class="like_button_container"><a href="javascript:void(0)" class="like_button_link like" id="like_<?php echo $item->getGuid(); ?>"><span class="like_button"><?php echo $this->translate("like_Like"); ?></span></a></div>
       <div style="display: none;" class="like_button_container"><a href="javascript:void(0)" class="like_button_link unlike" id="unlike_<?php echo $item->getGuid(); ?>"><span class="unlike_button"><?php echo $this->translate("like_Unlike"); ?></span></a></div>
      <?php endif; ?>
      
       <div class="clr"></div>
     </div>
     <?php
      $counter++;
      if ($counter % 3 == 0){
        echo '<div class="clr"></div>';
      }
     ?>
   <?php endforeach; ?>
   <div class="clr"></div>
 </div>
 <div class="clr"></div>
<?php endif; ?>

<?php if (isset($this->pages) && $this->pages->getTotalItemCount() > 0): ?>
 <div id="all_list_pages" class="list_type">
   <span class="list_header pages"><?php echo $this->translate("like_Pages"); ?></span>
   <?php $counter = 0; ?>
   <?php foreach ($this->pages as $item): ?>
     <div href="<?php echo $item->getHref(); ?>" target="_blank" class="item" id="<?php echo $item->getGuid(); ?>">
       <span class='photo' style='background-image: url()'><?php echo $this->htmlLink($item->getHref(), $this->itemPhoto($item, 'thumb.icon'), array('target' => '_blank')); ?></span>
       <span class="name"><?php echo $this->htmlLink($item->getHref(), $item->getTitle(), array('target' => '_blank')); ?></span>

      <?php if (Engine_Api::_()->like()->isLike($item)): ?>
       <div style="display: none;" class="like_button_container"><a href="javascript:void(0)" class="like_button_link like" id="like_<?php echo $item->getGuid(); ?>"><span class="like_button"><?php echo $this->translate("like_Like"); ?></span></a></div>
       <div class="like_button_container"><a href="javascript:void(0)" class="like_button_link unlike" id="unlike_<?php echo $item->getGuid(); ?>"><span class="unlike_button"><?php echo $this->translate("like_Unlike"); ?></span></a></div>
      <?php else: ?>
       <div class="like_button_container"><a href="javascript:void(0)" class="like_button_link like" id="like_<?php echo $item->getGuid(); ?>"><span class="like_button"><?php echo $this->translate("like_Like"); ?></span></a></div>
       <div style="display: none;" class="like_button_container"><a href="javascript:void(0)" class="like_button_link unlike" id="unlike_<?php echo $item->getGuid(); ?>"><span class="unlike_button"><?php echo $this->translate("like_Unlike"); ?></span></a></div>
      <?php endif; ?>

       <div class="clr"></div>
     </div>
     <?php
      $counter++;
      if ($counter % 3 == 0){
        echo '<div class="clr"></div>';
      }
     ?>
   <?php endforeach; ?>
   <div class="clr"></div>
 </div>
 <div class="clr"></div>
<?php endif; ?>

<div class="clr" id="he_contacts_end_line"></div>
<div id="he_disabled_div" class="hidden"></div>